import java.math.BigInteger;

public class Leetcode1015 {


    public static int smallestRepunitDivByK(int k) {
        if (k % 2 == 0 || k % 5 == 0) {
            return -1;
        }

        int start = 1;
        for (int i = 1; i <= k; i++) {
            start %= k;
            if (start == 0) {
                return i;
            }

            start *= 10;
            start += 1;
        }

        return -1;
    }

    public static void main(String[] args) {
        System.out.println(new BigInteger("1".repeat(27)).divide(new BigInteger("27")));
//        System.out.println(smallestRepunitDivByK(27));
    }


}
